//
//  UICollectionView+YSExtension.h
//  YSWeChat
//
//  Created by MOLBASE on 2018/4/15.
//  Copyright © 2018年 YangShen. All rights reserved.
//
/// 便捷注册Cell

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

@interface UICollectionView (YSExtension)

- (void)ys_registerCell:(Class)cls;
- (void)ys_registerNibCell:(Class)cls;
- (void)ys_registerNibCell:(Class)cls forCellReuseIdentifier:(NSString *)reuseIdentifier;

- (void)ys_registerFooterView:(Class)cls;
- (void)ys_registerFooterView:(Class)cls withReuseIdentifier:(NSString *)reuseIdentifier;
- (void)ys_registerNibFooterView:(Class)cls;
- (void)ys_registerNibFooterView:(Class)cls withReuseIdentifier:(NSString *)reuseIdentifier;

- (void)ys_registerHeaderView:(Class)cls;
- (void)ys_registerHeaderView:(Class)cls withReuseIdentifier:(NSString *)reuseIdentifier;
- (void)ys_registerNibHeaderView:(Class)cls;
- (void)ys_registerNibHeaderView:(Class)cls withReuseIdentifier:(NSString *)reuseIdentifier;

- (__kindof UICollectionViewCell *)ys_dequeueReusableCell:(Class)cls forIndexPath:(NSIndexPath *)indexPath;
- (__kindof UICollectionReusableView *)ys_dequeueReusableHeaderView:(Class)cls forIndexPath:(NSIndexPath *)indexPath;
- (__kindof UICollectionReusableView *)ys_dequeueReusableFooterView:(Class)cls forIndexPath:(NSIndexPath *)indexPath;

@end

NS_ASSUME_NONNULL_END
